//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using DataLayerBuilder;

namespace DataLayerBuilder
{
    class Program
    {
        static string file;
        static string outputFolder;

        static void Main(string[] args)
        {
            if (args.Length == 0)
                file = "datalayout.xml";
            else
                file = args[0];

            if (args.Length < 2)
                outputFolder = "output";
            else
                outputFolder = args[1];

            bool generateDB = true;

            if (args.Length > 2)
            {
                if (args[2] == "/sqlserver")
                {
                    // Generate SQL server scripts
                    generateDB = true;
                }
            }

            DataGen configBuilder = new DataGen();

            configBuilder.GenerateScripts(file, outputFolder, generateDB);
        }
    }
}
